﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d" 
    xmlns:Orktane_Controls="clr-namespace:Orktane.Controls;assembly=Orktane.Console" 
    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" 
    xmlns:Orktane_Behaviors="clr-namespace:Orktane.Behaviors;assembly=Orktane.ScriptActions" 
    xmlns:n="http://nRoute/schemas/2010/xaml" 
    xmlns:local="clr-namespace:Orktane.Sample.ConsoleApp.Behaviors" 
    x:Class="Orktane.Sample.ConsoleApp.MainPage"
    d:DesignWidth="900" d:DesignHeight="550">
	<Grid x:Name="LayoutRoot" Background="#FF26272A">

		<Grid.RowDefinitions>
			<RowDefinition/>
			<RowDefinition Height="38"/>
		</Grid.RowDefinitions>

        <!-- WALLPAPER -->
        <Image x:Name="Wallpaper" Stretch="UniformToFill" Grid.RowSpan="2" Source="http://bit.ly/bHs8P9"/>

        <!-- CONSOLE -->
		<Orktane_Controls:ConsoleWindow x:Name="consoleWindow" HorizontalAlignment="Left" Margin="0">
			<i:Interaction.Behaviors>
				<Orktane_Behaviors:ScriptActionConsoleBehavior/>
			</i:Interaction.Behaviors>
		</Orktane_Controls:ConsoleWindow>

        <!-- TASKBAR WITH BUTTON -->
		<Border Height="38" VerticalAlignment="Bottom" BorderBrush="#FFA7A7A7" BorderThickness="0" Margin="0" Grid.Row="1">
			<Border.Background>
				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
					<GradientStop Color="#CCC9BBBB" Offset="0.016"/>
					<GradientStop Color="#FF060606" Offset="0.56"/>
					<GradientStop Color="#C6000000" Offset="1"/>
					<GradientStop Color="#D7353333" Offset="0.5"/>
				</LinearGradientBrush>
			</Border.Background>
			<Grid>
				<Grid.ColumnDefinitions>
					<ColumnDefinition/>
					<ColumnDefinition Width="117"/>
				</Grid.ColumnDefinitions>
				<StackPanel Orientation="Horizontal">
					<Border BorderThickness="1,1,1,1" CornerRadius="4,4,4,4" Margin="3" Width="180"
						BorderBrush="#FF393939" Cursor="Hand">
						<i:Interaction.Triggers>
							<i:EventTrigger EventName="MouseEnter">
								<n:TargetedSetPropertyAction TargetName="glow" PropertyName="Opacity"
									Value="1"/>
							</i:EventTrigger>
							<i:EventTrigger EventName="MouseLeave">
								<n:TargetedSetPropertyAction TargetName="glow" PropertyName="Opacity"
									Value="0"/>
							</i:EventTrigger>
							<i:EventTrigger EventName="MouseLeftButtonUp">
								<local:TargetedToggleVisiblityAction TargetName="consoleWindow"/>
							</i:EventTrigger>
						</i:Interaction.Triggers>
						<Border x:Name="border" Background="#7F000000" BorderBrush="#FF000000" BorderThickness="1,1,1,1" CornerRadius="4,4,4,4">
							<Grid>
								<Grid.RowDefinitions>
									<RowDefinition Height="0.507*"/>
									<RowDefinition Height="0.493*"/>
								</Grid.RowDefinitions>
								<Border HorizontalAlignment="Stretch" x:Name="glow" Width="Auto" Grid.RowSpan="2" CornerRadius="4,4,4,4" Opacity="0">
									<Border.Background>
										<RadialGradientBrush>
											<RadialGradientBrush.RelativeTransform>
												<TransformGroup>
													<ScaleTransform ScaleX="1.702" ScaleY="2.243"/>
													<SkewTransform AngleX="0" AngleY="0"/>
													<RotateTransform Angle="0"/>
													<TranslateTransform X="-0.368" Y="-0.152"/>
												</TransformGroup>
											</RadialGradientBrush.RelativeTransform>
											<GradientStop Color="#B28DBDFF" Offset="0"/>
											<GradientStop Color="#008DBDFF" Offset="1"/>
										</RadialGradientBrush>
									</Border.Background>
								</Border>
								<ContentPresenter VerticalAlignment="Center" Width="Auto" Grid.RowSpan="2">
									<Grid>
										<TextBlock  Text="1" 
											Foreground="White" FontFamily="Webdings" FontSize="21" HorizontalAlignment="Left" 
                                                    Margin="8,-3,0,0" VerticalAlignment="Center"/>
										<TextBlock Text="Console Window" Foreground="White" HorizontalAlignment="Left" 
                                                   VerticalAlignment="Center" Margin="36,0,0,0" FontSize="12" />
									</Grid>
								</ContentPresenter>
								<Border HorizontalAlignment="Stretch" Margin="0,0,0,0" x:Name="shine" Width="Auto" CornerRadius="4,4,0,0">
									<Border.Background>
										<LinearGradientBrush EndPoint="0.494,0.889" StartPoint="0.494,0.028">
											<GradientStop Color="#99FFFFFF" Offset="0"/>
											<GradientStop Color="#33FFFFFF" Offset="1"/>
										</LinearGradientBrush>
									</Border.Background>
								</Border>
							</Grid>
						</Border>
					</Border>
				</StackPanel>
				<TextBlock x:Name="TimeText" Grid.Column="1" Text="11:57 AM" TextWrapping="Wrap" Foreground="White" FontSize="12"
                           VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,8,0"/>
			</Grid>
		</Border>
        
	</Grid>
</UserControl>
